//
// Thread.hpp for  in /home/lund/Projets/plazza
// 
// Made by florian dewulf
// Login   <dewulf_f@epitech.net>
// 
// Started on  Sun Apr 14 21:59:39 2013 florian dewulf
// Last update Mon Apr 15 20:39:51 2013 florian dewulf
//

#ifndef		THREAD_HPP_
# define	THREAD_HPP_

#include	<iostream>
#include	<string>
#include	<pthread.h>

class		Thread
{
public:
  Thread();
  virtual	~Thread();
  void		create(void *(*)(void *));
  void		join();

public: //getter & setter
  pthread_t	getThread() const;
  void		*getArg() const;
  void		**getRetval() const;
  bool		getError() const;
  void		setThread(pthread_t);
  void		setArg(void *);
  void		setRetval(void **);
  void		setError(bool);

private:
  void		*_arg;
  void		**_retval;
  bool		_error;
  pthread_t	_thread;
};

#endif
